﻿using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;

namespace Overview
{
    /// <summary>
    /// Interaction logic for CharClassOption.xaml
    /// </summary>
    public partial class CharClassOption : UserControl
    {
        public Type CharacterOccupation;

        public event EventHandler OnOcupationSelected;
        public event EventHandler OnNextStepSelected;


        public CharClassOption(Type pType, bool pNotLastClass)
        {
            InitializeComponent();
            BtnSelectCharOcc.Content = pType.Name;
            CharacterOccupation = pType;
            BtnChooseNextOcc.Visibility = pNotLastClass ? Visibility.Visible : Visibility.Hidden;
        }


        private void BtnSelectCharOcc_Click(object sender, RoutedEventArgs e)
        {
            if (this.OnOcupationSelected != null)
                this.OnOcupationSelected(CharacterOccupation, null);
        }

        private void BtnChooseNextOcc_Click(object sender, RoutedEventArgs e)
        {
            if (this.OnNextStepSelected != null)
                this.OnNextStepSelected(CharacterOccupation, null);
        }

    }
}
